﻿using System;

using Rsdn.SmartApp;

namespace Rsdn.Janus
{
	internal class CommandTargetStrategy :
		RegElementsStrategy<CommandTargetInfo, CommandTargetAttribute>
	{
		public CommandTargetStrategy(IServicePublisher publisher)
			: base(publisher) { }

		public override CommandTargetInfo CreateElement(
			IExtensionAttachmentContext<Type, Attribute> context,
			CommandTargetAttribute attr)
		{
			return new CommandTargetInfo(context.ExtensionType);
		}
	}
}